home *** CD-ROM | disk | FTP | other *** search
- property pSectionName, pGroupName, pInitialState, pIncludeRolloverState, ancestor
- global gGlobalObject
-
- on beginSprite me
- set previousItemDelimiter to the itemDelimiter
- set the itemDelimiter to "."
- set pSectionName to item 1 of the name of the member of sprite the spriteNum of me
- set currentSectionName to item 1 of getLabel()
- set the itemDelimiter to previousItemDelimiter
- if pIncludeRolloverState then
- set numTrans to 3
- else
- set numTrans to 2
- end if
- set togSty to 1
- set togGrup to pGroupName
- if currentSectionName = pSectionName then
- set togState to #on
- else
- set togState to #off
- end if
- set togOffbl to 0
- set selfTog to 1
- set togOnOthOff to 1
- set ancestor to new(script "Bitmap But 1", the spriteNum of me, numTrans, togSty, togGrup, togState, togOffbl, selfTog, togOnOthOff)
- end
-
- on MouseUpAction me
- SetPreviousSection()
- go(pSectionName)
- end
-
- on MouseDownAction me
- nothing()
- end
-
- on MouseEnterAction me
- nothing()
- end
-
- on MouseLeaveAction me
- nothing()
- end
-
- on getPropertyDescriptionList me
- set description to [:]
- addProp(description, #pIncludeRolloverState, [#default: 1, #format: #boolean, #comment: "Include Rollover State"])
- addProp(description, #pGroupName, [#default: "SectionButtons", #format: #string, #comment: "Toggle Group Name"])
- addProp(description, #pInitialState, [#default: #off, #format: #symbol, #comment: "Initial State", #range: [#off, #on]])
- return description
- end
-
- on getBehaviorDescription me
- set endChar to offset("--END OF HEADER", the text of me)
- set endLine to the number of lines in char 1 to endChar of the text of me - 1
- set description to line 1 to endLine of the text of me
- repeat with whichLine = endLine down to 1
- if line whichLine of description = EMPTY then
- delete line whichLine of description
- end if
- end repeat
- delete line 1 of description
- return description
- end
-